<template>
  <div class="app-container">
    <List ref="list"   @auditing-handle="auditingHandle" @detail-handle="detailHandle"></List>
    <!-- 添加或修改行政区划对话框 -->
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
               :title="title"
               :visible.sync="open"
               width="800px"
               append-to-body
               destroy-on-close
    >
      <Detail v-if="type === DETAIL" @cancel="cancelHandle" :id="id"  ></Detail>
      <Auditing v-if="type === AUDITING" @cancel="cancelHandle" :id="id" @reload="reloadHandle" ></Auditing>

    </el-dialog>
  </div>
</template>

<script>
import List from "./list.vue"
import Detail from "./detail.vue"
import Auditing from "./auditing.vue"

import IndexMixin from "@/minixs/index"
export default {
  name: "CaseInfo",
  mixins: [IndexMixin],
  components: {
    List,
    Auditing,
    Detail
  },
  data(){
    return {
      title:"案例信息审核",
      AUDITING:"AUDITING"
    }
  },
  methods:{
    auditingHandle(message){
      this.open = message.open
      this.title = message.title
      this.id = message.id;
      this.type = message.type
    }
  }
};
</script>
